<?php
namespace app\index;

class RequestEntity
{
    public $name;
    public $text;
    public $file;
    public $isrequire;
    public $length;
    public $size;

    /**
     * RequestEntity constructor.
     * @param $input
     * @param $name
     * @param $isrequire
     * @param $length
     */
    function __construct($input,$name,$isrequire,$length,$type='string') {
        if($type == 'array'){
            $this->text=input($input . '/a')!=null?input($input . '/a'):'';
        }else{
            $this->text=input($input)!=null?input($input):'';
        }
        $this->name=$name;
        $this->isrequire=$isrequire;
        $this->length=$length;
    }
    public function haha(){
        echo '1';
    }
}
